home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / QD3DIO.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  21.6 KB  |  525 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QD3DIO.p
  3.  
  4.      Contains:    QuickDraw 3D IO API                                                
  5.  
  6.      Version:    Technology:    Quickdraw 3D 1.5.4
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT QD3DIO;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __QD3DIO__}
  27. {$SETC __QD3DIO__ := 1}
  28.  
  29. {$I+}
  30. {$SETC QD3DIOIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __QD3D__}
  34. {$I QD3D.p}
  35. {$ENDC}
  36.  
  37. {$IFC UNDEFINED __QD3DDRAWCONTEXT__}
  38. {$I QD3DDrawContext.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __QD3DVIEW__}
  41. {$I QD3DView.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN POWER}
  47. {$LibExport+}
  48.  
  49. {*****************************************************************************
  50.  **                                                                              **
  51.  **                                    Basic Types                                 **                                                    
  52.  **                                                                              **
  53.  ****************************************************************************}
  54.  
  55. TYPE
  56.     TQ3Uns8                                = UInt8;
  57.     TQ3Int8                                = SInt8;
  58.     TQ3Uns16                            = UInt16;
  59.     TQ3Int16                            = SInt16;
  60.     TQ3Uns32                            = UInt32;
  61.     TQ3Int32                            = SInt32;
  62. {$IFC TARGET_RT_BIG_ENDIAN }
  63.     TQ3Uns64Ptr = ^TQ3Uns64;
  64.     TQ3Uns64 = RECORD
  65.         hi:                        UInt32;
  66.         lo:                        UInt32;
  67.     END;
  68.  
  69.     TQ3Int64Ptr = ^TQ3Int64;
  70.     TQ3Int64 = RECORD
  71.         hi:                        SInt32;
  72.         lo:                        UInt32;
  73.     END;
  74.  
  75. {$ELSEC}
  76.     TQ3Uns64 = RECORD
  77.         lo:                        UInt32;
  78.         hi:                        UInt32;
  79.     END;
  80.  
  81.     TQ3Int64 = RECORD
  82.         lo:                        UInt32;
  83.         hi:                        SInt32;
  84.     END;
  85.  
  86. {$ENDC}  {TARGET_RT_BIG_ENDIAN}
  87.  
  88.     TQ3Float32                            = Single;
  89.     TQ3Float64                            = Double;
  90.     TQ3Size                                = TQ3Uns32;
  91. {*****************************************************************************
  92.  **                                                                              **
  93.  **                                    File Types                                 **
  94.  **                                                                              **
  95.  ****************************************************************************}
  96.     TQ3FileModeMasks             = LONGINT;
  97. CONST
  98.     kQ3FileModeNormal            = {TQ3FileModeMasks}0;
  99.     kQ3FileModeStream            = {TQ3FileModeMasks}$01;
  100.     kQ3FileModeDatabase            = {TQ3FileModeMasks}$02;
  101.     kQ3FileModeText                = {TQ3FileModeMasks}$04;
  102.  
  103.  
  104. TYPE
  105.     TQ3FileMode                            = UInt32;
  106. {*****************************************************************************
  107.  **                                                                              **
  108.  **                                    Method Types                             **
  109.  **                                                                              **
  110.  ****************************************************************************}
  111. {
  112.  *    IO Methods
  113.  *
  114.  *    The IO system treats all objects as groups of typed information.
  115.  *    When you register your element or attribute, the "elementType" is the 
  116.  *    binary type of your object, the "elementName" the ascii type.
  117.  *    
  118.  *    All objects in the metafile are made up of a "root" or parent object which
  119.  *    defines the instantiated object type. You may define the format of your 
  120.  *    data any way you wish as long as you use the primitives types above and the
  121.  *    routines below.
  122.  *
  123.  *    Root Objects are often appended with additional child objects, called 
  124.  *    subobjects. You may append your object with other QuickDraw 3D objects.
  125.  *    
  126.  *    Writing is straightforward: an object traverses itself any other objects 
  127.  *    that make it up, then writes its own data. Writing uses two methods: 
  128.  *    TQ3XObjectTraverseMethod and TQ3XObjectWriteMethod.
  129.  *
  130.  *    The TQ3XObjectTraverseMethod method should:
  131.  *    + First, Determine if the data should be written 
  132.  *        - if you don't want to write out your object after examining your
  133.  *            data, return kQ3Success in your Traverse method without calling
  134.  *            any other submit calls.
  135.  *     + Next, calculate the size of your object on disk
  136.  *     + Gather whatever state from the view you need to preserve
  137.  *         - you may access the view state NOW, as the state of the
  138.  *             view duing your TQ3XObjectWriteMethod will not be valid. You may
  139.  *             pass a temporary buffer to your write method.
  140.  *     + Submit your view write data using Q3View_SubmitWriteData
  141.  *         - note that you MUST call this before any other "_Submit" call.
  142.  *         - you may pass in a "deleteMethod" for your data. This method
  143.  *             will be called whether or not your write method succeeds or fails.
  144.  *     + Submit your subobjects to the view
  145.  *     
  146.  *     The TQ3XObjectWriteMethod method should:
  147.  *     + Write your data format to the file using the primitives routines below.
  148.  *         - If you passed a "deleteMethod" in your Q3View_SubmitWriteData, that
  149.  *             method will be called upon exit of your write method.
  150.  *
  151.  *    Reading is less straightforward because your root object and
  152.  *    any subobjects must be read inside of your TQ3XObjectReadDataMethod. There 
  153.  *    is an implicit state contained in the file while reading, which you must 
  154.  *    be aware of. When you first enter the read method, you must physically 
  155.  *    read in your data format using the primitives routines until
  156.  *    
  157.  *    Q3File_IsEndOfData(file) == kQ3True
  158.  *    
  159.  *    Generally, your data format should be self-descriptive such that you do not
  160.  *    need to call Q3File_IsEndOfData to determine if you are done reading. 
  161.  *    However, this call is useful for determining zero-sized object or 
  162.  *    determining the end of an object's data.
  163.  *    
  164.  *    Once you have read in all the data, you may collect subobjects. A metafile
  165.  *    object ONLY has subobjects if it is in a container. The call
  166.  *    
  167.  *    Q3File_IsEndOfContainer(file)
  168.  *    
  169.  *    returns kQ3False if subobjects exist, and kQ3True if subobjects do not 
  170.  *    exist.
  171.  *    
  172.  *    At this point, you may use
  173.  *    
  174.  *    Q3File_GetNextObjectType
  175.  *    Q3File_IsNextObjectOfType
  176.  *    Q3File_ReadObject
  177.  *    Q3File_SkipObject
  178.  *    
  179.  *    to iterate through the subobjects until Q3File_IsEndOfContainer(file) 
  180.  *    is kQ3True.
  181.  * 
  182.  }
  183.  
  184. {
  185.  * IO Methods
  186.  }
  187.  
  188. CONST
  189.     kQ3XMethodTypeObjectFileVersion = 'vers';                    {  version  }
  190.     kQ3XMethodTypeObjectTraverse = 'trvs';                        {  byte count  }
  191.     kQ3XMethodTypeObjectTraverseData = 'trvd';                    {  byte count  }
  192.     kQ3XMethodTypeObjectWrite    = 'writ';                        {  Dump info to file  }
  193.     kQ3XMethodTypeObjectReadData = 'rddt';                        {  Read info from file into buffer or, attach read data to parent  }
  194.     kQ3XMethodTypeObjectRead    = 'read';
  195.     kQ3XMethodTypeObjectAttach    = 'attc';
  196.  
  197. {
  198.  *    TQ3XObjectTraverseMethod
  199.  *
  200.  *    For "elements" (meaning "attributes, too), you will be passed NULL for 
  201.  *    object. Sorry, custom objects will be available in the next major revision.
  202.  *
  203.  *    The "data" is a pointer to your internal element data.
  204.  *
  205.  *    The view is the current traversal view.
  206.  }
  207.  
  208. TYPE
  209. {$IFC TYPED_FUNCTION_POINTERS}
  210.     TQ3XObjectTraverseMethod = FUNCTION(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C;
  211. {$ELSEC}
  212.     TQ3XObjectTraverseMethod = ProcPtr;
  213. {$ENDC}
  214.  
  215. {
  216.  *  TQ3XObjectTraverseDataMethod
  217.  }
  218. {$IFC TYPED_FUNCTION_POINTERS}
  219.     TQ3XObjectTraverseDataMethod = FUNCTION(object: TQ3Object; data: UNIV Ptr; view: TQ3ViewObject): TQ3Status; C;
  220. {$ELSEC}
  221.     TQ3XObjectTraverseDataMethod = ProcPtr;
  222. {$ENDC}
  223.  
  224. {
  225.  *  TQ3XObjectWriteMethod
  226.  }
  227. {$IFC TYPED_FUNCTION_POINTERS}
  228.     TQ3XObjectWriteMethod = FUNCTION(object: UNIV Ptr; theFile: TQ3FileObject): TQ3Status; C;
  229. {$ELSEC}
  230.     TQ3XObjectWriteMethod = ProcPtr;
  231. {$ENDC}
  232.  
  233. {
  234.  *  Custom object writing 
  235.  }
  236. {$IFC TYPED_FUNCTION_POINTERS}
  237.     TQ3XDataDeleteMethod = PROCEDURE(data: UNIV Ptr); C;
  238. {$ELSEC}
  239.     TQ3XDataDeleteMethod = ProcPtr;
  240. {$ENDC}
  241.  
  242. FUNCTION Q3XView_SubmitWriteData(view: TQ3ViewObject; size: TQ3Size; data: UNIV Ptr; deleteData: TQ3XDataDeleteMethod): TQ3Status; C;
  243. FUNCTION Q3XView_SubmitSubObjectData(view: TQ3ViewObject; objectClass: TQ3XObjectClass; size: UInt32; data: UNIV Ptr; deleteData: TQ3XDataDeleteMethod): TQ3Status; C;
  244. {
  245.  *  TQ3XObjectReadMethod
  246.  }
  247.  
  248. TYPE
  249. {$IFC TYPED_FUNCTION_POINTERS}
  250.     TQ3XObjectReadMethod = FUNCTION(theFile: TQ3FileObject): TQ3Object; C;
  251. {$ELSEC}
  252.     TQ3XObjectReadMethod = ProcPtr;
  253. {$ENDC}
  254.  
  255. {
  256.  *    TQ3XObjectReadDataMethod
  257.  *
  258.  *  For "elements" (meaning "attributes", too), you must allocate stack space 
  259.  *    and call Q3Set_Add on "parentObject", which is an TQ3SetObject.
  260.  *
  261.  *    Otherwise, parentObject is whatever object your element is a subobject of...
  262.  }
  263. {$IFC TYPED_FUNCTION_POINTERS}
  264.     TQ3XObjectReadDataMethod = FUNCTION(parentObject: TQ3Object; theFile: TQ3FileObject): TQ3Status; C;
  265. {$ELSEC}
  266.     TQ3XObjectReadDataMethod = ProcPtr;
  267. {$ENDC}
  268.  
  269. {
  270.  *  TQ3XObjectAttachMethod
  271.  }
  272. {$IFC TYPED_FUNCTION_POINTERS}
  273.     TQ3XObjectAttachMethod = FUNCTION(childObject: TQ3Object; parentObject: TQ3Object): TQ3Status; C;
  274. {$ELSEC}
  275.     TQ3XObjectAttachMethod = ProcPtr;
  276. {$ENDC}
  277.  
  278.  
  279.  
  280. {*****************************************************************************
  281.  **                                                                              **
  282.  **                                Versioning                                     **
  283.  **                                                                              **
  284.  ****************************************************************************}
  285.     TQ3FileVersion                        = UInt32;
  286.  
  287. {*****************************************************************************
  288.  **                                                                              **
  289.  **                                File Routines                                 **
  290.  **                                                                              **
  291.  ****************************************************************************}
  292. {
  293.  * Creation and accessors
  294.  }
  295. FUNCTION Q3File_New: TQ3FileObject; C;
  296. FUNCTION Q3File_GetStorage(theFile: TQ3FileObject; VAR storage: TQ3StorageObject): TQ3Status; C;
  297. FUNCTION Q3File_SetStorage(theFile: TQ3FileObject; storage: TQ3StorageObject): TQ3Status; C;
  298. {
  299.  * Opening, and accessing "open" state, closing/cancelling
  300.  }
  301. FUNCTION Q3File_OpenRead(theFile: TQ3FileObject; VAR mode: TQ3FileMode): TQ3Status; C;
  302. FUNCTION Q3File_OpenWrite(theFile: TQ3FileObject; mode: TQ3FileMode): TQ3Status; C;
  303. FUNCTION Q3File_IsOpen(theFile: TQ3FileObject; VAR isOpen: TQ3Boolean): TQ3Status; C;
  304. FUNCTION Q3File_GetMode(theFile: TQ3FileObject; VAR mode: TQ3FileMode): TQ3Status; C;
  305. FUNCTION Q3File_GetVersion(theFile: TQ3FileObject; VAR version: TQ3FileVersion): TQ3Status; C;
  306. FUNCTION Q3File_Close(theFile: TQ3FileObject): TQ3Status; C;
  307. FUNCTION Q3File_Cancel(theFile: TQ3FileObject): TQ3Status; C;
  308. {
  309.  * Writing (Application)
  310.  }
  311. FUNCTION Q3View_StartWriting(view: TQ3ViewObject; theFile: TQ3FileObject): TQ3Status; C;
  312. FUNCTION Q3View_EndWriting(view: TQ3ViewObject): TQ3ViewStatus; C;
  313. {
  314.  * Reading (Application)
  315.  }
  316. FUNCTION Q3File_GetNextObjectType(theFile: TQ3FileObject): TQ3ObjectType; C;
  317. FUNCTION Q3File_IsNextObjectOfType(theFile: TQ3FileObject; ofType: TQ3ObjectType): TQ3Boolean; C;
  318. FUNCTION Q3File_ReadObject(theFile: TQ3FileObject): TQ3Object; C;
  319. FUNCTION Q3File_SkipObject(theFile: TQ3FileObject): TQ3Status; C;
  320. FUNCTION Q3File_IsEndOfData(theFile: TQ3FileObject): TQ3Boolean; C;
  321. FUNCTION Q3File_IsEndOfContainer(theFile: TQ3FileObject; rootObject: TQ3Object): TQ3Boolean; C;
  322. FUNCTION Q3File_IsEndOfFile(theFile: TQ3FileObject): TQ3Boolean; C;
  323. {    
  324.  *  External file references
  325.  }
  326. FUNCTION Q3File_MarkAsExternalReference(theFile: TQ3FileObject; sharedObject: TQ3SharedObject): TQ3Status; C;
  327. FUNCTION Q3File_GetExternalReferences(theFile: TQ3FileObject): TQ3GroupObject; C;
  328. {    
  329.  *  Tracking editing in read-in objects with custom elements
  330.  }
  331. FUNCTION Q3Shared_ClearEditTracking(sharedObject: TQ3SharedObject): TQ3Status; C;
  332. FUNCTION Q3Shared_GetEditTrackingState(sharedObject: TQ3SharedObject): TQ3Boolean; C;
  333. {    
  334.  *  Reading objects inside a group one-by-one
  335.  }
  336.  
  337. TYPE
  338.     TQ3FileReadGroupStateMasks     = LONGINT;
  339. CONST
  340.     kQ3FileReadWholeGroup        = {TQ3FileReadGroupStateMasks}0;
  341.     kQ3FileReadObjectsInGroup    = {TQ3FileReadGroupStateMasks}$01;
  342.     kQ3FileCurrentlyInsideGroup    = {TQ3FileReadGroupStateMasks}$02;
  343.  
  344.  
  345. TYPE
  346.     TQ3FileReadGroupState                = UInt32;
  347. FUNCTION Q3File_SetReadInGroup(theFile: TQ3FileObject; readGroupState: TQ3FileReadGroupState): TQ3Status; C;
  348. FUNCTION Q3File_GetReadInGroup(theFile: TQ3FileObject; VAR readGroupState: TQ3FileReadGroupState): TQ3Status; C;
  349.  
  350. {
  351.  * Idling
  352.  }
  353.  
  354. TYPE
  355. {$IFC TYPED_FUNCTION_POINTERS}
  356.     TQ3FileIdleMethod = FUNCTION(theFile: TQ3FileObject; idlerData: UNIV Ptr): TQ3Status; C;
  357. {$ELSEC}
  358.     TQ3FileIdleMethod = ProcPtr;
  359. {$ENDC}
  360.  
  361. FUNCTION Q3File_SetIdleMethod(theFile: TQ3FileObject; idle: TQ3FileIdleMethod; idleData: UNIV Ptr): TQ3Status; C;
  362.  
  363. {*****************************************************************************
  364.  **                                                                              **
  365.  **                                Primitives Routines                             **
  366.  **                                                                              **
  367.  ****************************************************************************}
  368. FUNCTION Q3NewLine_Write(theFile: TQ3FileObject): TQ3Status; C;
  369. FUNCTION Q3Uns8_Read(VAR data: TQ3Uns8; theFile: TQ3FileObject): TQ3Status; C;
  370. FUNCTION Q3Uns8_Write(data: ByteParameter; theFile: TQ3FileObject): TQ3Status; C;
  371. FUNCTION Q3Uns16_Read(VAR data: TQ3Uns16; theFile: TQ3FileObject): TQ3Status; C;
  372. FUNCTION Q3Uns16_Write(data: TQ3Uns16; theFile: TQ3FileObject): TQ3Status; C;
  373. FUNCTION Q3Uns32_Read(VAR data: TQ3Uns32; theFile: TQ3FileObject): TQ3Status; C;
  374. FUNCTION Q3Uns32_Write(data: TQ3Uns32; theFile: TQ3FileObject): TQ3Status; C;
  375. FUNCTION Q3Int8_Read(VAR data: TQ3Int8; theFile: TQ3FileObject): TQ3Status; C;
  376. FUNCTION Q3Int8_Write(data: TQ3Int8; theFile: TQ3FileObject): TQ3Status; C;
  377. FUNCTION Q3Int16_Read(VAR data: TQ3Int16; theFile: TQ3FileObject): TQ3Status; C;
  378. FUNCTION Q3Int16_Write(data: TQ3Int16; theFile: TQ3FileObject): TQ3Status; C;
  379. FUNCTION Q3Int32_Read(VAR data: TQ3Int32; theFile: TQ3FileObject): TQ3Status; C;
  380. FUNCTION Q3Int32_Write(data: TQ3Int32; theFile: TQ3FileObject): TQ3Status; C;
  381. FUNCTION Q3Uns64_Read(VAR data: TQ3Uns64; theFile: TQ3FileObject): TQ3Status; C;
  382. FUNCTION Q3Uns64_Write(data: TQ3Uns64; theFile: TQ3FileObject): TQ3Status; C;
  383. FUNCTION Q3Int64_Read(VAR data: TQ3Int64; theFile: TQ3FileObject): TQ3Status; C;
  384. FUNCTION Q3Int64_Write(data: TQ3Int64; theFile: TQ3FileObject): TQ3Status; C;
  385. FUNCTION Q3Float32_Read(VAR data: TQ3Float32; theFile: TQ3FileObject): TQ3Status; C;
  386. FUNCTION Q3Float32_Write(data: TQ3Float32; theFile: TQ3FileObject): TQ3Status; C;
  387. FUNCTION Q3Float64_Read(VAR data: TQ3Float64; theFile: TQ3FileObject): TQ3Status; C;
  388. FUNCTION Q3Float64_Write(data: TQ3Float64; theFile: TQ3FileObject): TQ3Status; C;
  389. FUNCTION Q3Size_Pad(size: TQ3Size): TQ3Size; C;
  390. {
  391.  * Pass a pointer to a buffer of kQ3StringMaximumLength bytes
  392.  }
  393. FUNCTION Q3String_Read(data: CStringPtr; VAR length: UInt32; theFile: TQ3FileObject): TQ3Status; C;
  394. FUNCTION Q3String_Write(data: ConstCStringPtr; theFile: TQ3FileObject): TQ3Status; C;
  395.  * This call will read Q3Size_Pad(size) bytes,
  396.  *    but only place size bytes into data.
  397.  }
  398. FUNCTION Q3RawData_Read(VAR data: UInt8; size: UInt32; theFile: TQ3FileObject): TQ3Status; C;
  399.  * This call will write Q3Size_Pad(size) bytes,
  400.  *    adding 0's to pad to the nearest 4 byte boundary.
  401.  }
  402. FUNCTION Q3RawData_Write({CONST}VAR data: UInt8; size: UInt32; theFile: TQ3FileObject): TQ3Status; C;
  403. {*****************************************************************************
  404.  **                                                                              **
  405.  **                        Convenient Primitives Routines                         **
  406.  **                                                                              **
  407.  ****************************************************************************}
  408. FUNCTION Q3Point2D_Read(VAR point2D: TQ3Point2D; theFile: TQ3FileObject): TQ3Status; C;
  409. FUNCTION Q3Point2D_Write({CONST}VAR point2D: TQ3Point2D; theFile: TQ3FileObject): TQ3Status; C;
  410. FUNCTION Q3Point3D_Read(VAR point3D: TQ3Point3D; theFile: TQ3FileObject): TQ3Status; C;
  411. FUNCTION Q3Point3D_Write({CONST}VAR point3D: TQ3Point3D; theFile: TQ3FileObject): TQ3Status; C;
  412. FUNCTION Q3RationalPoint3D_Read(VAR point3D: TQ3RationalPoint3D; theFile: TQ3FileObject): TQ3Status; C;
  413. FUNCTION Q3RationalPoint3D_Write({CONST}VAR point3D: TQ3RationalPoint3D; theFile: TQ3FileObject): TQ3Status; C;
  414. FUNCTION Q3RationalPoint4D_Read(VAR point4D: TQ3RationalPoint4D; theFile: TQ3FileObject): TQ3Status; C;
  415. FUNCTION Q3RationalPoint4D_Write({CONST}VAR point4D: TQ3RationalPoint4D; theFile: TQ3FileObject): TQ3Status; C;
  416. FUNCTION Q3Vector2D_Read(VAR vector2D: TQ3Vector2D; theFile: TQ3FileObject): TQ3Status; C;
  417. FUNCTION Q3Vector2D_Write({CONST}VAR vector2D: TQ3Vector2D; theFile: TQ3FileObject): TQ3Status; C;
  418. FUNCTION Q3Vector3D_Read(VAR vector3D: TQ3Vector3D; theFile: TQ3FileObject): TQ3Status; C;
  419. FUNCTION Q3Vector3D_Write({CONST}VAR vector3D: TQ3Vector3D; theFile: TQ3FileObject): TQ3Status; C;
  420. FUNCTION Q3Matrix4x4_Read(VAR matrix4x4: TQ3Matrix4x4; theFile: TQ3FileObject): TQ3Status; C;
  421. FUNCTION Q3Matrix4x4_Write({CONST}VAR matrix4x4: TQ3Matrix4x4; theFile: TQ3FileObject): TQ3Status; C;
  422. FUNCTION Q3Tangent2D_Read(VAR tangent2D: TQ3Tangent2D; theFile: TQ3FileObject): TQ3Status; C;
  423. FUNCTION Q3Tangent2D_Write({CONST}VAR tangent2D: TQ3Tangent2D; theFile: TQ3FileObject): TQ3Status; C;
  424. FUNCTION Q3Tangent3D_Read(VAR tangent3D: TQ3Tangent3D; theFile: TQ3FileObject): TQ3Status; C;
  425. FUNCTION Q3Tangent3D_Write({CONST}VAR tangent3D: TQ3Tangent3D; theFile: TQ3FileObject): TQ3Status; C;
  426. {    This call affects only text Files - it is a no-op in binary files }
  427. FUNCTION Q3Comment_Write(comment: CStringPtr; theFile: TQ3FileObject): TQ3Status; C;
  428. {*****************************************************************************
  429.  **                                                                              **
  430.  **                                Unknown Object                                 **
  431.  **                                                                              **
  432.  **        Unknown objects are generated when reading files which contain         **
  433.  **        custom data which has not been registered in the current             **
  434.  **        instantiation of QuickDraw 3D.                                         **
  435.  **                                                                              **
  436.  ****************************************************************************}
  437. FUNCTION Q3Unknown_GetType(unknownObject: TQ3UnknownObject): TQ3ObjectType; C;
  438. FUNCTION Q3Unknown_GetDirtyState(unknownObject: TQ3UnknownObject; VAR isDirty: TQ3Boolean): TQ3Status; C;
  439. FUNCTION Q3Unknown_SetDirtyState(unknownObject: TQ3UnknownObject; isDirty: TQ3Boolean): TQ3Status; C;
  440.  
  441. {*****************************************************************************
  442.  **                                                                              **
  443.  **                            Unknown Text Routines                             **
  444.  **                                                                              **
  445.  ****************************************************************************}
  446.  
  447. TYPE
  448.     TQ3UnknownTextDataPtr = ^TQ3UnknownTextData;
  449.     TQ3UnknownTextData = RECORD
  450.         objectName:                CStringPtr;                                {  '\0' terminated  }
  451.         contents:                CStringPtr;                                {  '\0' terminated  }
  452.     END;
  453.  
  454. FUNCTION Q3UnknownText_GetData(unknownObject: TQ3UnknownObject; VAR unknownTextData: TQ3UnknownTextData): TQ3Status; C;
  455. FUNCTION Q3UnknownText_EmptyData(VAR unknownTextData: TQ3UnknownTextData): TQ3Status; C;
  456.  
  457. {*****************************************************************************
  458.  **                                                                              **
  459.  **                            Unknown Binary Routines                             **
  460.  **                                                                              **
  461.  ****************************************************************************}
  462.  
  463. TYPE
  464.     TQ3UnknownBinaryDataPtr = ^TQ3UnknownBinaryData;
  465.     TQ3UnknownBinaryData = RECORD
  466.         objectType:                TQ3ObjectType;
  467.         size:                    UInt32;
  468.         byteOrder:                TQ3Endian;
  469.         contents:                CStringPtr;
  470.     END;
  471.  
  472. FUNCTION Q3UnknownBinary_GetData(unknownObject: TQ3UnknownObject; VAR unknownBinaryData: TQ3UnknownBinaryData): TQ3Status; C;
  473. FUNCTION Q3UnknownBinary_EmptyData(VAR unknownBinaryData: TQ3UnknownBinaryData): TQ3Status; C;
  474.  
  475. FUNCTION Q3UnknownBinary_GetTypeString(unknownObject: TQ3UnknownObject; VAR typeString: CStringPtr): TQ3Status; C;
  476. FUNCTION Q3UnknownBinary_EmptyTypeString(VAR typeString: CStringPtr): TQ3Status; C;
  477. {*****************************************************************************
  478.  **                                                                              **
  479.  **                            ViewHints routines                                 **
  480.  **                                                                              **
  481.  **        ViewHints are an object in a metafile to give you some hints on how     **
  482.  **        to render a scene.    You may create a view with any of the objects     **
  483.  **        retrieved from it, or you can just throw it away.                     **
  484.  **                                                                              **
  485.  **        To write a view hints to a file, create a view hints object from a     **
  486.  **        view and write the view hints.                                         **
  487.  **                                                                              **
  488.  ****************************************************************************}
  489. FUNCTION Q3ViewHints_New(view: TQ3ViewObject): TQ3ViewHintsObject; C;
  490. FUNCTION Q3ViewHints_SetRenderer(viewHints: TQ3ViewHintsObject; renderer: TQ3RendererObject): TQ3Status; C;
  491. FUNCTION Q3ViewHints_GetRenderer(viewHints: TQ3ViewHintsObject; VAR renderer: TQ3RendererObject): TQ3Status; C;
  492. FUNCTION Q3ViewHints_SetCamera(viewHints: TQ3ViewHintsObject; camera: TQ3CameraObject): TQ3Status; C;
  493. FUNCTION Q3ViewHints_GetCamera(viewHints: TQ3ViewHintsObject; VAR camera: TQ3CameraObject): TQ3Status; C;
  494. FUNCTION Q3ViewHints_SetLightGroup(viewHints: TQ3ViewHintsObject; lightGroup: TQ3GroupObject): TQ3Status; C;
  495. FUNCTION Q3ViewHints_GetLightGroup(viewHints: TQ3ViewHintsObject; VAR lightGroup: TQ3GroupObject): TQ3Status; C;
  496. FUNCTION Q3ViewHints_SetAttributeSet(viewHints: TQ3ViewHintsObject; attributeSet: TQ3AttributeSet): TQ3Status; C;
  497. FUNCTION Q3ViewHints_GetAttributeSet(viewHints: TQ3ViewHintsObject; VAR attributeSet: TQ3AttributeSet): TQ3Status; C;
  498. FUNCTION Q3ViewHints_SetDimensionsState(viewHints: TQ3ViewHintsObject; isValid: TQ3Boolean): TQ3Status; C;
  499. FUNCTION Q3ViewHints_GetDimensionsState(viewHints: TQ3ViewHintsObject; VAR isValid: TQ3Boolean): TQ3Status; C;
  500. FUNCTION Q3ViewHints_SetDimensions(viewHints: TQ3ViewHintsObject; width: UInt32; height: UInt32): TQ3Status; C;
  501. FUNCTION Q3ViewHints_GetDimensions(viewHints: TQ3ViewHintsObject; VAR width: UInt32; VAR height: UInt32): TQ3Status; C;
  502. FUNCTION Q3ViewHints_SetMaskState(viewHints: TQ3ViewHintsObject; isValid: TQ3Boolean): TQ3Status; C;
  503. FUNCTION Q3ViewHints_GetMaskState(viewHints: TQ3ViewHintsObject; VAR isValid: TQ3Boolean): TQ3Status; C;
  504. FUNCTION Q3ViewHints_SetMask(viewHints: TQ3ViewHintsObject; {CONST}VAR mask: TQ3Bitmap): TQ3Status; C;
  505. FUNCTION Q3ViewHints_GetMask(viewHints: TQ3ViewHintsObject; VAR mask: TQ3Bitmap): TQ3Status; C;
  506. { Call Q3Bitmap_Empty when done with the mask    }
  507. FUNCTION Q3ViewHints_SetClearImageMethod(viewHints: TQ3ViewHintsObject; clearMethod: TQ3DrawContextClearImageMethod): TQ3Status; C;
  508. FUNCTION Q3ViewHints_GetClearImageMethod(viewHints: TQ3ViewHintsObject; VAR clearMethod: TQ3DrawContextClearImageMethod): TQ3Status; C;
  509. FUNCTION Q3ViewHints_SetClearImageColor(viewHints: TQ3ViewHintsObject; {CONST}VAR color: TQ3ColorARGB): TQ3Status; C;
  510. FUNCTION Q3ViewHints_GetClearImageColor(viewHints: TQ3ViewHintsObject; VAR color: TQ3ColorARGB): TQ3Status; C;
  511.  
  512.  
  513. {$ALIGN RESET}
  514. {$POP}
  515.  
  516. {$SETC UsingIncludes := QD3DIOIncludes}
  517.  
  518. {$ENDC} {__QD3DIO__}
  519.  
  520. {$IFC NOT UsingIncludes}
  521.  END.
  522. {$ENDC}
  523.